<!--
    页面名称：管理员 - 查看指定员工信息
    作者: 苗怀雨
    时间:2017-12-31 22:46:30
-->

<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="tag" tagdir="/WEB-INF/tags" %>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<!DOCTYPE html>
<html>
<tag:head title="员工信息" ctx="${ctx}">
	<!-- Switchery -->
	<link href="${ctx}/assets/css/switchery/switchery.min.css" rel="stylesheet">
	<!-- this page -->
	<link href="${ctx}/assets/css/admin/admin_department_add/style.css" rel="stylesheet">
</tag:head>

<tag:body>
	<!-- 左 上 导航 -->
	<tag:nav ctx="${ctx}"></tag:nav>

	<!-- page content -->
	<tag:content title="管理员信息">
        <div class="col-md-10 col-sm-3 col-xs-12 form-horizontal">
			<form action="${ctx}/admin/updateAdmin" method="post">
				<div class="form-group" style="display: none">
					<label class="control-label col-sm-2">管理员ID:</label>
					<div class="col-sm-2">
						<input type="text" name="adminId" value="${requestScope.admin.administratorId}" class="form-control col-md-3 col-xs-12"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label col-sm-2">用户名:</label>
					<div class="col-sm-4">
						<input type="text" name="username" value="${requestScope.admin.username}" disabled class="form-control col-md-3 col-xs-12"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label col-sm-2">姓名:</label>
					<div class="col-sm-4">
						<input type="text" name="adminName" placeholder="长度不能超过10"  value="${requestScope.admin.name}" class="form-control col-md-3 col-xs-12"/>
						<div class="error"></div>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label col-sm-2">角色:</label>
					<div class="col-sm-4">
						<select class="form-control" id="role" name="roleId">
							<option value="">无</option>
							<c:forEach var="role" items="${requestScope.roles}">
								<option value="${role.roleId}">${role.name}</option>
							</c:forEach>
						</select>
						<div class="error"></div>
					</div>
				</div>
                <div class="ln_solid"></div>
                <div class="form-group">
                    <div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-4">
                        <button id="save" type="button" class="btn btn-success">保存</button>
                        <button type="button" class="btn btn-info">返回</button>
                    </div>
                </div>
                <div class="emptyRow"></div>
			</form>
		</div>
	</tag:content>
	<!-- /page content -->

	<!-- footer content -->
	<tag:footer></tag:footer>

</tag:body>

<!-- javascript-->
<tag:javascript ctx="${ctx}">
	<script src="${ctx}/assets/js/admin/admin_admin_info/admin_admin_info.js"></script>	<!-- this page -->
	<!-- Switchery -->
	<script src="${ctx}/assets/js/switchery/switchery.js"></script>
	<script>
		$("select").val(${requestScope.admin.role.roleId});
	</script>
</tag:javascript>
</html>
